package com.ourteam.workspace.domain;
/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Nov 30 16:49:33 CST 2018
 * Auto Generate Date : 2018-11-30 16:49:53
  * Warning ! This file will be overwrite when regenerate !
  * 
 */

import java.util.Map;
import java.util.HashMap;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.beanutils.BeanMap;
import net.dao.IDataPopulateCallback;


public class WorkspaceResourceBean implements java.io.Serializable {

        
	private static Map<String,String> mappedDaoFields = new HashMap<String,String>();
    
	private com.ourteam.workspace.dao.WorkspaceResource workspaceResource;

	protected BeanMap getBeanMap(){
	
		return new BeanMap(workspaceResource);
	}
	
	static{
				
																
		mappedDaoFields.put("description",com.ourteam.workspace.dao.IWorkspaceResourceDAO.Description);
		
																														
				
																								
				
												
		mappedDaoFields.put("id",com.ourteam.workspace.dao.IWorkspaceResourceDAO.Id);
		
																																		
				
																								
				
																																								
		mappedDaoFields.put("name",com.ourteam.workspace.dao.IWorkspaceResourceDAO.Name);
		
						
				
																								
				
																				
		mappedDaoFields.put("orderIndex",com.ourteam.workspace.dao.IWorkspaceResourceDAO.OrderIndex);
		
																										
				
																								
				
																								
		mappedDaoFields.put("resourcePath",com.ourteam.workspace.dao.IWorkspaceResourceDAO.ResourcePath);
		
																						
				
																								
				
																												
		mappedDaoFields.put("resourceType",com.ourteam.workspace.dao.IWorkspaceResourceDAO.ResourceType);
		
																		
				
																								
				
																																
		mappedDaoFields.put("status",com.ourteam.workspace.dao.IWorkspaceResourceDAO.Status);
		
														
				
																								
				
																																				
		mappedDaoFields.put("workspaceId",com.ourteam.workspace.dao.IWorkspaceResourceDAO.WorkspaceId);
		
										
				
																								
				
																																						
				
										
		mappedDaoFields.put("workspaceName",com.ourteam.workspace.dao.IWorkspaceResourceDAO.WorkspaceName);
																
				
																																						
				
																		
		mappedDaoFields.put("workspacePath",com.ourteam.workspace.dao.IWorkspaceResourceDAO.WorkspacePath);
								
				
				
	}
	
	public static String getMappedDAOField(String aAttrName){
		return mappedDaoFields.get(aAttrName);
	}
	
	
	public WorkspaceResourceBean() {
		super();
	    		
		this.workspaceResource = new com.ourteam.workspace.dao.WorkspaceResource();
                
	}
	
		
	public WorkspaceResourceBean(com.ourteam.workspace.dao.WorkspaceResource workspaceResource) {
		super();
	
		this.workspaceResource = workspaceResource;
		
	}
		
		
		
    	
	public com.ourteam.workspace.dao.WorkspaceResource convertToWorkspaceResource(){
		return this.workspaceResource;
	}
	
	public com.ourteam.workspace.dao.WorkspaceResource convertTo(){
		return this.workspaceResource;
	}
	
			
		
					
			
		
	/**
	 * Get description
	 * 
	 * @return String
	 */
	public String getDescription(){
		return (String) this.workspaceResource.getDescription();
	}
	
	/**
	 * Set description
	 * 
	 * @parameter String
	 */
	public void setDescription(String description){
		
		this.workspaceResource.setDescription(description);
	}
		
															
			
													
		
		
			
			
		
	/**
	 * Get id
	 * 
	 * @return long
	 */
	public long getId(){
		return (long) this.workspaceResource.getId();
	}
	
	/**
	 * Set id
	 * 
	 * @parameter long
	 */
	public void setId(long id){
		
		this.workspaceResource.setId(id);
	}
		
																	
			
													
		
		
																	
			
		
	/**
	 * Get name
	 * 
	 * @return String
	 */
	public String getName(){
		return (String) this.workspaceResource.getName();
	}
	
	/**
	 * Set name
	 * 
	 * @parameter String
	 */
	public void setName(String name){
		
		this.workspaceResource.setName(name);
	}
		
			
			
													
		
		
							
			
		
	/**
	 * Get orderIndex
	 * 
	 * @return int
	 */
	public int getOrderIndex(){
		return (int) this.workspaceResource.getOrderIndex();
	}
	
	/**
	 * Set orderIndex
	 * 
	 * @parameter int
	 */
	public void setOrderIndex(int orderIndex){
		
		this.workspaceResource.setOrderIndex(orderIndex);
	}
		
													
			
													
		
		
									
			
		
	/**
	 * Get resourcePath
	 * 
	 * @return String
	 */
	public String getResourcePath(){
		return (String) this.workspaceResource.getResourcePath();
	}
	
	/**
	 * Set resourcePath
	 * 
	 * @parameter String
	 */
	public void setResourcePath(String resourcePath){
		
		this.workspaceResource.setResourcePath(resourcePath);
	}
		
											
			
													
		
		
											
			
		
	/**
	 * Get resourceType
	 * 
	 * @return String
	 */
	public String getResourceType(){
		return (String) this.workspaceResource.getResourceType();
	}
	
	/**
	 * Set resourceType
	 * 
	 * @parameter String
	 */
	public void setResourceType(String resourceType){
		
		this.workspaceResource.setResourceType(resourceType);
	}
		
									
			
													
		
		
													
			
		
	/**
	 * Get status
	 * 
	 * @return String
	 */
	public String getStatus(){
		return (String) this.workspaceResource.getStatus();
	}
	
	/**
	 * Set status
	 * 
	 * @parameter String
	 */
	public void setStatus(String status){
		
		this.workspaceResource.setStatus(status);
	}
		
							
			
													
		
		
															
			
		
	/**
	 * Get workspaceId
	 * 
	 * @return long
	 */
	public long getWorkspaceId(){
		return (long) this.workspaceResource.getWorkspaceId();
	}
	
	/**
	 * Set workspaceId
	 * 
	 * @parameter long
	 */
	public void setWorkspaceId(long workspaceId){
		
		this.workspaceResource.setWorkspaceId(workspaceId);
	}
		
					
			
													
		
		
																		
			
					
			
		
	/**
	 * Get workspaceName
	 * 
	 * @return String
	 */
	public String getWorkspaceName(){
		
		return (String) this.workspaceResource.getWorkspaceName();
			
	}
	
									
		
		
																		
			
									
			
		
	/**
	 * Get workspacePath
	 * 
	 * @return String
	 */
	public String getWorkspacePath(){
		
		return (String) this.workspaceResource.getWorkspacePath();
			
	}
	
					
		
			
			
			
			
			
			
			
			
			
			
			
			
	
	public int hashCode() {
   		return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
 	}
	
		
	public boolean equals(Object obj) {
		if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof WorkspaceResourceBean) == false) {
            return false;
        } // end if

        WorkspaceResourceBean other = (WorkspaceResourceBean) obj;
        
        boolean isEqual = false;
        
                
        com.ourteam.workspace.dao.WorkspaceResource tempWorkspaceResource = other.convertToWorkspaceResource();
        
        if(tempWorkspaceResource == null || this.workspaceResource == null){
        	isEqual = false;
        }
        else if(tempWorkspaceResource == this.workspaceResource || tempWorkspaceResource.equals(this.workspaceResource) ){
        	isEqual = true;
        }
        else{
        	isEqual = false;
        }
        
        return isEqual;
	}
	
	
	public static WorkspaceResourceBean[] toArray(com.ourteam.workspace.dao.WorkspaceResource[] aWorkspaceResources){
		
		return toArray(aWorkspaceResources,null);
	}
	
	public static WorkspaceResourceBean[] toArray(com.ourteam.workspace.dao.WorkspaceResource[] aWorkspaceResources , IDataPopulateCallback aCallBack){
		 
		 if(ArrayUtils.isEmpty(aWorkspaceResources)){
		 	return new WorkspaceResourceBean[0];
		 }
		 
		 int length = aWorkspaceResources.length;
		 
		 WorkspaceResourceBean[] beans = new WorkspaceResourceBean[length];
		  
		 for (int i = 0; i < length; i++) {
			beans[i] = new WorkspaceResourceBean(aWorkspaceResources[i]);
			if(aCallBack != null){
			    aCallBack.populate(beans[i],new Object[]{aWorkspaceResources[i]});
			}
		 }
		 
		 return beans;
	 }
	 
	 	 
}